home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / nktools.zip / EPSONTST.PAS < prev    next >
Pascal/Delphi Source File  |  1991-02-11  |  3KB  |  98 lines

  1. program EpsonTst (input,output);
  2. uses
  3.     Epson;
  4.  
  5. const
  6.     PolyPoints    = 12;
  7.  
  8. var
  9.     PltClr,
  10.     XPos,
  11.     YPos    : Integer;
  12.  
  13. procedure PixLine(s : String);
  14.     var
  15.     i    : Integer;
  16.     begin
  17.     for i := 1 to length(s) do
  18.             case s[i] do
  19.             ':':begin
  20.                     PutDot(XPos+i-1,YPos,1);
  21.                     PutDot(XPos+i-1,YPos-1,1)
  22.                 end;
  23.             '`':PutDot(XPos+i-1,YPos-1,1);
  24.             '.':PutDot(XPos+i-1,YPos,1)
  25.             end;
  26.     Dec(YPos,2)
  27.     end;
  28.  
  29. var
  30.     i,j        : Integer;
  31.     Xa,Ya    : Word;
  32.     PP        : array [0..PolyPoints] of PointType;
  33. begin
  34.     OpenPlot(False,'prtfile');
  35.  
  36.     (*---- lower left corner ----*)
  37.     Line(0,0,10,0);
  38.     Line(0,0,0,10);
  39.  
  40.     (*---- upper left corner ----*)
  41.     Line(0,DotMaxY,10,DotMaxY);
  42.     Line(0,DotMaxY,0,DotMaxY-10);
  43.  
  44.     (*---- lower right corner ----*)
  45.     Line(DotMaxX,0,DotMaxX-10,0);
  46.     Line(DotMaxX,0,DotMaxX,10);
  47.  
  48.     (*---- upper right corner ----*)
  49.     Line(DotMaxX,DotMaxY,DotMaxX-10,DotMaxY);
  50.     Line(DotMaxX,DotMaxY,DotMaxX,DotMaxY-10);
  51.  
  52.     (*--- crosshairs at center ----*)
  53.     i := DotMaxX div 2;
  54.     j := DotMaxY div 2;
  55.     Line(i-10,j,i+10,j);
  56.     Line(i,j-10,i,j+10);
  57.  
  58.     GetPlotAspectRatio(Xa,Ya);
  59.     PlotRectangle(10,200, 110,300);
  60.     PlotRectangle(10,10, 10+100, 10+(100*Xa) div Ya);
  61.  
  62.     for j := 4 to PolyPoints do begin
  63.     for i := 1 to j do
  64.         with PP[i] do begin
  65.         X := trunc(cos(2*i*pi/j)*j*30)
  66.             +(DotMaxX div 2);
  67.         Y := trunc(sin(2*i*pi/j)*j*30*Xa/Ya)
  68.             +(DotMaxY div 2)
  69.           end;
  70.     PP[0] := PP[j];
  71.     DrawPoly(j+1,PP);
  72.       end;
  73.  
  74.     XPos := DotMaxX-70;
  75.     YPos := 16;
  76.     PixLine('```::```                           ..');
  77.     PixLine('   ::    ....    .....  ...::...   ..   . .....    ..... .');
  78.     PixLine('   ::  ::....:: ``....     ::      ::   ::    ::  ::    ::');
  79.     PixLine('   ::  ``.....  .....:`    `:.:` ..::.. ::    ::  `:....::');
  80.     PixLine('                                                   .....:`');
  81.  
  82.     YPos := 200;
  83.     XPos := 100;
  84.     PixLine('    :````````````````:')
  85.     PixLine('    : .````````````. :');
  86.     PixLine('    : :    `  `    : :');
  87.     PixLine('    : :  `......`  : :');
  88.     PixLine('    : `............` :')
  89.     PixLine('    `................`                  ..................');
  90.     PixLine('.........................          ..```           ..``:..:.');
  91.     PixLine(':              .......  :      ...:...............:.......');
  92.     PixLine(':                       :``....:                .  .  .  :');
  93.     PixLine(':.......................:      :.........................:');
  94.  
  95.     PrintBitMap;
  96.     ClosePlot
  97. end.
  98.